import { handleActions } from 'redux-actions'
import { SET_PROFILE } from '../types/counter'
//,SET_SHOW_MPQRCODE



export default handleActions({
  // [INCREMENT] (state) {
  //   return {
  //     ...state,
  //     num: state.num + 1
  //   }
  // },
  // [DECREMENT] (state) {
  //   return {
  //     ...state,
  //     num: state.num - 1
  //   }
  // },
  // [ASYNC_INCREMENT] (state, action) {
  //   return {
  //     ...state,
  //     asyncNum: state.asyncNum + action.payload
  //   }
  // }
  [SET_PROFILE] (state, action) {
    console.log('SET_PROFILE',state,action)
    return {
      ...state,
      profile: action.payload.data
    }
  },
  // [SET_SHOW_MPQRCODE] (state, action)  {
  //   console.log('SET_SHOW_MPQRCODE',state,action)
  //   return {
  //     ...state,
  //     showMpQrcode: action.payload.data
  //   }
   
  // }
}, {
  // num: 0,
  // asyncNum: 0
  profile: {},
  // showMpQrcode: true

})